package com.hnevc.vx.adapter;


import android.content.Context;

import androidx.annotation.NonNull;
import androidx.fragment.app.Fragment;
import androidx.fragment.app.FragmentManager;
import androidx.fragment.app.FragmentPagerAdapter;

import java.util.ArrayList;

public class MyAdapter extends FragmentPagerAdapter {
    Context context;
    ArrayList fragmentList;

    public MyAdapter(@NonNull FragmentManager fm, Context context, ArrayList fragmentList) {
        super(fm);
        this.context = context;
        this.fragmentList = fragmentList;
    }

    public MyAdapter(@NonNull FragmentManager fm, int behavior, Context context, ArrayList fragmentList) {
        super(fm, behavior);
        this.context = context;
        this.fragmentList = fragmentList;
    }

    public MyAdapter(@NonNull FragmentManager fm) {
        super(fm);
    }

    @NonNull
    @Override
    public Fragment getItem(int position) {
        return(Fragment) fragmentList.get(position);
    }

    @Override
    public int getCount() {
        return fragmentList.size();
    }
}
